JBoss Community Archive (Read Only)

RHQ 4.7

Design-Remote Services

A significant difference in approach was the initial approach to expose the Local interfaces nearly completely.  In this second go there is a goal to provide a smaller set of Remote interfaces that remain robust yet are easier to use for the vast majority of integration use cases.  It will de-emphasize administration and focus on operational aspects of integration. This set of remopte interfaces must support the CLI, as well as support as many of our known use cases as possible.  A more general goal is to be able to build powerful applications, both automation and GUI oriented, on this set of services.  Although, it is not the goal to be able to implement the full JON GUI on this set of services.
These remote interfaces will be made available via JBoss Remoting for Java clients, and JAX-WS (JBossWS) for non-Java clients (although nothing prevents a Java WS client as well, it's just not obvious what the need would be given JBoss remoting).
Proposed Remote Interface:

Review value = Y(in)/#(in, use case number)/N(out)/M(maybe, proposed but no current use case)/
Test Status value = P(pass)/F(fail) blank indicates untested

Remote Interface

Review

Test Status

Service

AlertDefinitionManagerRemote

 

 

 

 

 

 

AlertDefinition getAlertDefinitionById(Subject user, int alertDefinitionId)

  • perhaps only return name/description

AlertManagerRemote

Y

 

 

 

2

 

PageList<Alert> findAlerts(Subject subject, Integer[] resourceIds, AlertPriority priority, long timeRange, PageControl pageControl)

AvailabilityManagerRemote

 

 

 

 

 

 

List<AvailabilityPoint> getAvailabilitiesForResource(Subject whoami, int resourceId, long begin, long end, int points)

 

 

 

AvailabilityType getCurrentAvailabilityTypeForResource(Subject whoami, int resourceId)

CallTimeDataManagerRemote

 

 

 

 

 

 

PageList<CallTimeDataComposite> getCallTimeDataForResource(Subject subject, int scheduleId, long begin, long end, PageControl pageControl)

 

 

 

PageList<CallTimeDataComposite> getCallTimeDataForCompatibleGroup(Subject subject, int groupId, int measurementDefinitionId, long begin, long end, PageControl pageControl)

 

 

 

 

PageList<CallTimeDataComposite> getCallTimeDataForAutoGroup(Subject subject, int parentId, int childResourceTypeId, int measurementDefinitionId, long begin, long end, PageControl pageControl)

ChannelManagerRemote

Y

 

 

 

 

8

 

void addPackageVersionsToChannel(Subject subject, int channelId, int[] packageVersionIds) throws Exception

 

8

 

Channel createChannel(Subject subject, Channel channel) throws ChannelException

 

8

 

void deleteChannel(Subject subject, int channelId)

 

8

 

PageList<Channel> getAllChannels(Subject subject, PageControl pc)

 

8

 

PageList<Resource> getSubscribedResources(Subject subject, int channelId, PageControl pc)

 

8

 

PageList<PackageVersion> getPackageVersionsInChannel(Subject subject, int channelId, String filter, PageControl pc)

 

8

 

void subscribeResourceToChannels(Subject subject, int resourceId, int[] channelIds)

 

8

 

void unsubscribeResourceFromChannels(Subject subject, int resourceId, int[] channelIds)

 

8

 

Channel updateChannel(Subject subject, Channel channel) throws ChannelException

ClusterManagerRemote

 

 

 

 

 

 

??? Any need to remotely change server operation mode?

ConfigurationManagerRemote

Y

 

 

 

M

 

Configuration getConfigurationById(Subject whoami, int id)

  • added Subject param

 

3

 

Configuration getCurrentPluginConfiguration(Subject user, int resourceId)

 

3

 

Configuration getCurrentResourceConfiguration(Subject user, int resourceId)

 

M

 

Configuration getLiveResourceConfiguration(Subject user, int resourceId)

 

M

 

ConfigurationDefinition getPluginConfigurationDefinitionForResourceType(Subject whoami, int resourceTypeId)

 

M

 

ConfigurationDefinition getResourceConfigurationDefinitionForResourceType(Subject whoami, int resourceTypeId)

 

3

 

boolean isResourceConfigurationUpdateInProgress(Subject user, int resourceId)

 

3

 

PluginConfigurationUpdate updatePluginConfiguration(Subject whoami, int resourceId, Configuration newConfiguration);

 

3

 

ResourceConfigurationUpdate updateResourceConfiguration(Subject whoami, int resourceId, Configuration newConfiguration)

ContentManagerRemote

Y

 

 

 

8

 

PackageVersion createPackageVersion(String packageName, int packageTypeId, String version, int architectureId,InputStream packageBitStream)

 

8

 

void deletePackages(Subject user, int resourceId, Set<Integer> installedPackageIds, String requestNotes)

 

8

 

void deployPackages(Subject user, Set<Integer> resourceIds, Set<Integer> packageVersionIds)

DiscoveryBossRemote

N

 

 

 

N

 

??? Do we need to allow resource add?

EventManagerRemote

Y

 

 

 

5

 

PageList<EventComposite> getEventsForResource(Subject subject, int resourceId, long begin, long end, EventSeverity severity, String source, String detail, PageControl pc)

 

 

 

PageList<EventComposite> getEventsForAutoGroup(Subject subject, int groupId, long begin, long end, EventSeverity severity, int parentId, String source, String detail, PageControl

 

 

 

PageList<EventComposite> getEventsForCompGroup(Subject subject, int groupId, long begin, long end, EventSeverity severity, int eventId, String source, String detail, PageControl pc)
pc)

 

 

 

EventSeverity[] getSeverityBuckets(Subject subject, int resourceId, long begin, long end, int numBuckets)

 

 

 

EventSeverity[] getSeverityBucketsForAutoGroup(Subject subject, int parentId, long begin, long end, int numBuckets)

 

 

 

EventSeverity[] getSeverityBucketsForCompGroup(Subject subject, int groupId, long begin, long end, int numBuckets)

MeasurementBaselineManagerRemote

 

 

 

 

 

 

MeasurementBaseline findBaselineForResourceAndMeasurementDefinition(Subject subject, Integer resource, Integer measurementDefinitionId)

 

 

 

List<MeasurementBaseline> findBaselinesForResource(Subject subject, Resource resource)

  • added Subject param

 

 

 

PageList<MeasurementBaselineComposite> getAllDynamicMeasurementBaselines(Subject subject, int agentId, Subject subject, PageControl pc)

  • added Subject param

MeasurementDataManagerRemote

Y

 

 

 

 

 

MeasurementAggregate getAggregate(Subject subject, MeasurementSchedule sched, long start, long end) throws MeasurementException

  • added Subject param

 

4

 

List<MeasurementDataTrait> getAllTraitDataForResourceAndDefinition(Subject subject, int resourceId, int definitionId)

  • added Subject param

 

4

 

Set<MeasurementData> getLiveData(Subject subject, int resourceId, Set<Integer> definitionIds)

  • added Subject param

 

 

 

List<List<MeasurementDataNumericHighLowComposite>> getMeasurementDataForAutoGroup(Subject subject, int autoGroupParentResourceId, int autoGroupChildResourceTypeId, int measurementDefinitionId, long beginTime, long endTime, int numberOfDataPoints, boolean aggregateOverAutoGroup)

 

 

 

List<List<MeasurementDataNumericHighLowComposite>> getMeasurementDataForCompatibleGroup(Subject subject, int compatibleGroupId, int measurementDefinitionId, long beginTime, long endTime, int numberOfDataPoints, boolean aggregateOverGroup)

 

4

 

List<List<MeasurementDataNumericHighLowComposite>> getMeasurementDataForResource(Subject subject, int resourceId, int[] measurementDefinitionIds, long beginTime, long endTime, int dataPoints)

 

 

 

List<MetricDisplaySummary> getMetricDisplaySummariesForAutoGroup(Subject subject, int autoGroupParentResourceId, int autoGroupChildResourceTypeId, int[] measurementDefinitionIds, long begin, long end, boolean enabledOnly)

 

 

 

List<MetricDisplaySummary> getMetricDisplaySummariesForCompatibleGroup(Subject subject, int groupId, Int[] measurementDefinitionIds, long begin, long end, boolean enabledOnly) throws MeasurementException

 

 

 

List<MetricDisplaySummary> getMetricDisplaySummariesForMetrics(Subject subject, int resourceId, DataType dataType,
long begin, long end, boolean narrowed, boolean enabledOnly) throws MeasurementException

 

 

 

List<MetricDisplaySummary> getMetricDisplaySummariesForResource(Subject subject, int resourceId, int[] measurementDefinitionIds, long begin, long end) throws MeasurementException

MeasurementDefinitionManagerRemote

 

 

 

 

 

 

List<MeasurementDefinition> getMeasurementDefinitionsByIds(Subject subject, Integer[] measurementDefinitionIds)

 

 

 

List<MeasurementDefinition> getMeasurementDefinitionsByResourceType(Subject user, int resourceTypeId, DataType dataType, DisplayType displayType)

MeasurementProblemManagerRemote

 

 

 

 

M

 

PageList<ProblemResourceComposite> findProblemResources(Subject subject, long oldestDate, int maxResources)

 

 

 

PageList<MeasurementOutOfBounds> findResourceMeasurementOutOfBounds(Subject subject, long oldestDate, int resourceId, PageControl pc)

 

 

 

PageList<MeasurementOutOfBounds> findScheduleMeasurementOutOfBounds(Subject subject, long oldestDate,int scheduleId, PageControl pc)

 

 

 

public Map<Integer, Integer> getMeasurementSchedulesOOBCount(Subject subject, long begin, long end, List<Integer> scheduleIds)

  • added Subject param

MeasurementScheduleManagerRemote

 

 

 

 

 

 

PageList<MeasurementScheduleComposite> getDefaultMeasurementSchedulesForResourceType(Subject subject, int resourceTypeId, PageControl pageControl)

 

 

 

List<MeasurementSchedule> getMeasurementSchedulesByDefinitionIdAndResources(Subject subject, int definitionId, List<Resource> resources)

 

 

 

PageList<MeasurementScheduleComposite> getMeasurementSchedulesForAutoGroup(Subject subject, int parentId, int childType, PageControl pageControl)

 

 

 

public PageList<MeasurementScheduleComposite> getMeasurementSchedulesForCompatGroup(Subject subject, int groupId, PageControl pageControl)

 

 

 

PageList<MeasurementScheduleComposite> getMeasurementSchedulesForResource(Subject subject, int resourceId, DataType dataType, PageControl pageControl)

 

 

 

List<MeasurementSchedule> getSchedulesByIds(Subject subject, Collection<Integer> ids)

  • added Subject param

OperationManagerRemote

Y

 

 

 

1

 

void cancelOperationHistory(Subject user, int historyId, boolean ignoreAgentErrors)

 

1

 

void deleteOperationHistory(Subject user, int historyId, boolean purgeInProgress)

 

1

 

PageList<ResourceOperationHistory> getCompletedResourceOperationHistories(Subject user, int resourceId, PageControl pc)

 

1

 

PageList<ResourceOperationHistory> getPendingResourceOperationHistories(Subject user, int resourceId, PageControl pc)

 

M

 

PageList<ResourceOperationHistory> getResourceOperationHistories(Subject whoami, int resourceId, PageControl pc) ??? add status param?

 

M

 

OperationHistory(Subject whoami, int historyId) getOperationHistoryByHistoryId(Subject whoami, int historyId)

 

M

 

OperationHistory getOperationHistoryByJobId(Subject whoami, String historyJobId)

 

 

 

List<GroupOperationSchedule> getScheduledGroupOperations(Subject whoami, int groupId) throws SchedulerException

 

1

 

List<ResourceOperationSchedule> getScheduledResourceOperations(Subject user, int resourceId) throws SchedulerException

 

M

 

OperationDefinition getSupportedResourceOperations(Subject user, int resourceId, String operationName)

 

M

 

List<OperationDefinition> getSupportedResourceOperations(Subject whoami, int resourceId)

 

M

 

List<OperationDefinition> getSupportedResourceTypeOperations(Subject whoami, int resourceTypeId)

 

 

 

GroupOperationSchedule scheduleGroupOperation(Subject whoami, int groupId, int[] executionOrderResourceIds,boolean haltOnFailure, String operationName, Configuration parameters, Trigger trigger, String description) throws SchedulerException

 

1

 

ResourceOperationSchedule scheduleResourceOperation(Subject user, int resourceId, String operationName,Configuration parameters, Trigger trigger, String description) throws SchedulerException

  • Simplified parameters

 

 

 

void unscheduleGroupOperation(Subject whoami, String jobId, int resourceGroupId) throws SchedulerException

 

1

 

void unscheduleResourceOperation(Subject user, String jobId, int resourceId) throws SchedulerException

ResourceGroupManagerRemote

 

 

 

 

 

 

PageList<ResourceGroupComposite> getAllResourceGroups(Subject subject, GroupCategory groupCategory, ResourceCategory resourceCategory, ResourceType resourceType, String nameFilter, PageControl pageControl)

 

 

 

PageList<ResourceGroupComposite> getResourceGroupsForResource(Subject subject, int resourceId, PageControl pageControl)

ResourceManagerRemote

Y

 

 

 

1

 

PageList<ResourceComposite> findResourceComposites(Subject user, ResourceCategory category, String typeName, int parentResourceId, String searchString, PageControl pageControl)

 

 

 

PageList<Resource> getChildResourcesByCategoryAndInventoryStatus(Subject user, Resource parent, ResourceCategory category, InventoryStatus status, PageControl pageControl)

 

 

 

PageList<Resource> getExplicitResourcesByResourceGroup(Subject subject, ResourceGroup group, PageControl pageControl)

 

 

 

PageList<ResourceWithAvailability> getImplicitResourceWithAvailabilityByResourceGroup(Subject subject,ResourceGroup group, PageControl pageControl)

 

 

 

Resource getResourceById(Subject user, int resourceId)

 

3

 

PageList<Resource> getResourceByIds(Subject subject, Integer[] resourceIds, boolean attachParentResource,PageControl pageControl)

ResourceTypeManagerRemote

 

 

 

 

 

 

List<ResourceType> getAllResourceTypesByCategory(Subject subject, ResourceCategory category)

 

 

 

List<ResourceType> getChildResourceTypesByCategory(Subject subject, Resource parentResource,ResourceCategory resourceCategory)

 

 

 

ResourceFacets getResourceFacets(Subject subject, int resourceTypeId) throws ResourceTypeNotFoundException

 

 

 

List<ResourceType> getResourceTypesByPlugin(Subject subject, String pluginName)

  • added Subject param

 

 

 

List<ResourceType> getUtilizedChildResourceTypesByCategory(Subject subject, Resource parentResource,ResourceCategory resourceCategory)

RoleManagerRemote

7

 

 

 

7

 

void assignRolesToSubject(Subject subject, Integer subjectId, Integer[] roleIds)

 

7

 

PageList<Role> getAllRoles(Subject subject, PageControl pc)

 

7

 

PageList<Role> getAvailableRolesForSubject(Subject subject, Integer subjectId, Integer[] pendingRoleIds, PageControl pc

 

7

 

PageList<Role> getRoles(Subject subject, Subject rolesSubject, PageControl pc)

 

7

 

PageList<Subject> getRoleSubjects(Subject subject, Integer roleId, PageControl pc)

 

7

 

void removeRolesFromSubject(Subject subject, Integer subjectId, Integer[] roleIds)

SubjectManagerRemote

Y

 

 

 

7

 

Subject createSubject(Subject whoami, Subject subject) throws CreateException

 

7

 

void createPrincipal(Subject subject, String username, String password) throws Exception

 

7

 

void deleteUsers(Subject subject, Integer[] subjectIds) throws Exception

 

7

 

Subject getSubject(Subject subject, int subjectIdString, SubjectDataEnum[] optionalData)

 

7

 

Subject getSubjectByName(Subject subject, String username, SubjectDataEnum[] optionalData)

 

7

 

PageList<Subject> findSubjects(Subject subject, Map<SubjectFindEnum,Object> criteria, SubjectDataEnum[] optionalData, PageControl pc)

 

Y

 

boolean isLoggedIn(String username)

 

Y

 

Subject login(String username, String password) throws LoginException

 

Y

 

void logout(int sessionId)

 

7

 

void setPassword(Subject subject, String username, String password) throws Exception

 

7

 

Subject updateSubject(Subject subject, Subject subjectToModify)

Locals without planned remotes at this time:

Remote Interface

Notes

AffinityGroupManagerLocal

Not necessary, administration via GUI

AgentManagerLocal

Not necessary, administration via GUI

AgentStatusManagerLocal

Server impl, no exposure necessary

AlertConditionCacheManagerLocal

Server impl, no exposure necessary

AlertConditionLogManagerLocal

Server impl, no exposure necessary

AlertConditionManagerLocal

Not necessary to see alert conditions, just alert firings/history

AlertDampeningManagerLocal

Server impl, no exposure necessary

AlertNotificationManagerLocal

Not necessary to manipulate notifications

AlertTemplateManagerLocal

Not necessary to manipulate alert templates

AuthorizationManagerRemote

Logged in user will be denied services if they don't have the permissions necessary. Inspection of authorization information may not be needed.

CachedConditionManagerLocal

Server impl, no exposure necessary

CachedConditionProducerLocal

Server impl, no exposure necessary

CacheConsistencyManagerLocal

Server impl, no exposure necessary

ConfigurationMetadataManagerLocal

Do we need to be able to update config, leaning against...

ContentSourceManagerLocal

Not necessary, administration via GUI

ContentUIManagerLocal

Not necessary, administration via GUI

EmailManagerLocal

Server impl, no exposure necessary

EntityManagerFacadeLocal

Server impl, no exposure necessary

FailoverListManagerLocal

Not necessary, administration via GUI

GroupDefinitionExpressionBuilderManagerLocal

Not necessary, GUI support

GroupDefinitionManagerLocal

Not necessary, administration via GUI

MeasurementCompressionManagerLocal

Server impl, no exposure necessary

PartitionEventManagerLocal

Not necessary, administration via GUI

PerspectiveManagerLocal

Server impl, no exposure necessary

ProductVersionManagerLocal

Not necessary, administration via GUI

ResourceBossLocal

??? maybe need the ability to get an Inventory summary for the user ?

ResourceMetadataManagerLocal

Server impl, no exposure necessary

ResourceFactoryManagerLocal

Not necessary, administration via GUI

SchedulerLocal

Server impl, no exposure necessary

ServerManagerLocal

Not necessary, administration via GUI

SystemManagerLocal

Server impl, no exposure necessary ??? getVersion?

 

 

Use Cases

The use cases give a more detailed idea of what the API must offer. Based on the existing use cases following lists summarize the current requirements:

Goals Summary

  • Authenticated sessions

  • Authorized services

  • Export/Read-Only focus

  • Resource and Group Level services

  • Operational control (i.e. Operation execution)

  • Live/Current metric data

  • User management

  • Deployment

Goals Summary

  • Most Administration

    • Content

    • HA

    • Template

    • Role

  • Group Definition/Creation

    • Dyna-Group Calculation

  • Configuration update

  • Inventory import/add/uninventory/delete

Applicable to all use cases:

  • login/logout will start/end all service interaction

  • resources includes resource groups where applicable

Use Case #1 - JBossAS Activation

  1. find a JBossAS resource of interest

  2. start/stop/restart the JBossAS resource

Use Case #2 - Export Alerts

  1. find resource(s) of interest

  2. get Alert History

Use Case #3 - Configuration Management

  1. find resources or plugins of interest

  2. get the current configuration

  3. Update the configuration

Use case #4 - Export current (live) Numeric or Trait metric data

  1. find resources of interest

  2. get the current metric data

Use Case #5 - Export Event data

  1. find resources of interest

  2. get event history

Use case #6 - Support the CLI

The CLI should be able to leverage the remote API as a remote client. Use cases of the CLI are therefore also candidates for use cases of the remote API.

Use case #7 - User management / LDAP Integration

Priority: High

  1. check user existence

  2. add user

  3. optionally, perform password mgmt

  4. assign to existing roles
    or

  5. delete user
    or update user

Use case #8 - Deployment

Source: M. Dickson

  1. Support CLI-based or direct deployments of ear/war/jar/scripts

Additional (Joe's)automate the import / ignore process

always want to import all jboss-as
always want to ignore certain other servers that may be running
come up with that forumla, then script it as each new box is added
also, be able to rename according to some internal conventions to make identification easier wrt infrastructure
need to expose connection properties as well as query for machine traits

sla reporting
figure out the percentage downtime across the enterprise / each box / each server

flexible alert notifications
today we don't implement "send me emails once / hr containing all alerts that have triggered"
integration with EmailManagerBean

system activity
query all BLAH created in the last X timeframe, groupby user (also support arbitrary timeframes)
BLAH := op defs / alert def / plugin configuration changes / visible groups created

dynagroup enhancements
dynagroups may not support expression to create groups properly (name contains substr1 or substr2)
so resource search and get the dynagroups grouping functionality via scripts
cron the script so as to mimic dynagroup recalculation intervals

ldap integration
new ldap users become new JON users and have roles/perms automatically setup for them
when user leaves ldap, then automatically disable corresponding JON account
how to provide ldap query funcs - ldap plugin, exposed slsb, tell them to use 3rd party api?

scheduled patch rollout
automatically add all resources in some group to a channel
patch a single instance or multiple instances
aggregate the statuses of "group patch" rollout

complex alert actions
execute operation (with arguments) on some arbitrary resource, as a result of an alert
pass some contextual information from the alert into the operation
can we make this simple for alerting on different levels - resource, group, template?

geographic affinity
query agents and group them into affinity based on location, name, subnet, etc
which agents are NOT connected to their primary?
might be indication of network health or unexpected failover events
also, are any agents not reporting back? last heard from time is greater than X

script chaining
instead of having to copy/paste functionality between scripts, allow decomposition
each script does some elemental work, can chain them together during a user session
login script, action script, logout script

dynamic favorites
add to / remove from resource / group / chart favorites based on rules
perhaps machines with ISSUES become favorites so they can easily be identified/worked on by ops
ISSUES := currently down, alerting often, problem metrics

reporting
recently added resources, anything imported in the last day - counts by resource category, resource type, agent, etc
system metrics / min - group by server, group by agent
report hardware summary for each machine, easy to see whether collection frequency is too high given physical limitations

hot-spot metric scheduling
if metric-based alert is triggered, automatically increase frequency of collection for that metric
after a restart, collect metrics quickly until box is proven stable, then decrease collection interval

alert escalation
instead of using notification policy, programmatically send alert email to some user
if "issue" not resolved in X time, send to next user in the list
question - is there a way to integrate this list into the core without too much work?
do escalation policies require us to implement alert ack'ing? (acknowledgements)

follow-the-sun alerting
similar to alert escalation, except that different users are notified depending on what time it is
if alert occurs at 18:00 UCT, notify the US support team, if 10:00 UTC notify the EU support team

maintenance windows
temporarily disable alerts across resource or group according to known maintenance windows

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-12 13:57:28 UTC, last content change 2009-06-11 18:04:38 UTC.